package com.ar4j.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Defines a default field name and value for a ActiveRecord lookup method (findBy, findAllBy, countBy)
 */
@Target({})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DefaultParameter {

  /**
   * @return the name of the parameter field
   */
  String name();
  
  /**
   * @return the type of the value, so that it can be converted form a String
   */
  Class<?> valueType() default String.class;
  
  /**
   * @return the value of the parameter as a String
   */
  String value();
  
}
